<template>
  <div id="app" v-if="finishPrepare">
    <router-view></router-view>
    <loading v-if="showLoading"/>
    <ds-activity v-if="activityShow" :okCallback="activitySignal.okCallback"></ds-activity>
    <ds-no-signal v-if="signalShow" :okCallback="noSignal.okCallback" :title="noSignal.title" :refresh="noSignal.refresh"></ds-no-signal>
    <DSError :showing="errorShow" :okCallback="alertList.okCallback" :cancelCallback="alertList.cancelCallback" :title2="alertList.title2" :title1="alertList.title1" :title="alertList.title" :errorCancel="alertList.errorCancel"></DSError>
    <cp-alert-view :okCallback="cityAlert.okCallback" :cancelAlert="cityAlert.cancelAlert" id="cityAlertView" v-if="cityAlert.show" :title="cityAlert.title">
    </cp-alert-view>
  </div>
</template>
<script>
  import {mapState} from 'vuex';
  export default {
    data(){
      return {
        finishPrepare: false,
        alertTitle: ''
      }
    },
    computed: {
      ...mapState({
        showLoading: state => state.rootModule.showLoading,
        errorShow: state => state.rootModule.alertOptions.show,
        alertList: state => state.rootModule.alertOptions.alertList,
        cityAlert: state => state.rootModule.cityAlert,
        noSignal: state => state.rootModule.noSignal.signalList,
        signalShow:state => state.rootModule.noSignal.show,
        activityShow:state => state.rootModule.activitySignal.show,
        activitySignal: state => state.rootModule.activitySignal.activityList
      }),
      cityAlertTitle: function () {
      }
    },
    methods: {
      filmHotfilms(){
        return {
          city: 2, page: 1
        };
      }
    },
    mounted() {
      this.finishPrepare = true;
    }
  }
</script>

<style>
  html {
    font-family: Arial, "Microsoft YaHei", "wenquanyi micro hei", sans-serif;
    font-size: 62.5%;
  }

  #app {
    font-family: 'Avenir', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #2c3e50;
  }
  *{ font-family:'KaiTi',微软雅黑,'MicrosoftJhengHei',华文细黑,STHeiti,MingLiu }
</style>
